{extend name="public/base" /}
{block name="main-container"}
<article class="main-menu">
    <form class="layui-form m20">
        <div class="layui-form-item" id="page-category">
            <label class="layui-form-label">页面分类</label>
            <div class="layui-input-inline">
                <select name="category_id" lay-filter="categoryFilter">
                    {volist name="categorys" id="category"}
                    {present name="category.leaf"}
                    <option value="{$category.id}" disabled>{php}echo str_repeat("&nbsp;&nbsp;",$category['level']).dec2roman($category['level']);{/php}—{$category.name}</option>
                    {else/}
                    <option value="{$category.id}" {eq name="category.id" value="$Request.param.cid" }selected{/eq}>{php}echo str_repeat("&nbsp;&nbsp;",$category['level']).dec2roman($category['level']);{/php}—{$category.name}</option>
                    {/present}
                    {/volist}
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">页面标题</label>
            <div class="layui-input-block">
                <input type="text" class="layui-input" lay-verify="required" placeholder="请输入标题" name="name" value="{$page.name}">
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">页面关键字</label>
            <div class="layui-input-block">
                <input type="text" class="layui-input" lay-verify="required" placeholder="请输入关键字" name="keywords" value="{$page.keywords}">
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">页面内容</label>
            <div class="layui-input-block">
                <textarea class="layui-textarea layui-hide" placeholder="请输入内容" name="content" lay-verify="content" id="content-editor">{$page.content}</textarea>
            </div>
        </div>

        <div class="layui-input-block">
            <input type="hidden" name="id" value="{$page.category_id}">
            <a class="layui-btn save-btn layui-btn-normal" lay-filter="save" lay-submit>{:lang('save')}</a>
            <input type="reset" class="layui-btn layui-btn-primary goback" value="{:lang('rest')}">
        </div>
    </form>
</article>
{/block}